#include "stdafx.h"
#include "wf_filenew.h"

#include "pf_graphic.h"



WF_FileNew::WF_FileNew(PF_Container& container,
                                   PF_GraphicView& graphicView)
        :PF_ActionInterface("File New", container, graphicView) {}


QAction* WF_FileNew::createGUIAction(LX_Define::ActionType /*type*/, QObject* parent) {
	// tr("New Drawing")
	QAction* action = new QAction(tr("&New..."), parent);
#if QT_VERSION >= 0x040600
        action->setIcon(QIcon::fromTheme("document-new", QIcon(":/actions/filenew.png")));
#else
        action->setIcon(QIcon(":/actions/filenew.png"));
#endif
	action->setShortcut(QKeySequence::New);
    //action->zetStatusTip(tr("Creates a new drawing"));
	
    return action;
}


void WF_FileNew::trigger() {
    /*    // Not supported currently
    PF_DEBUG->print("PF_ActionFileNew::trigger");

    PF_DIALOGFACTORY->requestFileNewDialog();
    if (graphic!=NULL && !fileName.isEmpty()) {
        graphic->open(fileName, );
}*/
    
    finish();
}


void WF_FileNew::init(int status) {
    PF_ActionInterface::init(status);
    trigger();
}

// EOF
